package com.qf.day03.loop;

import java.util.Scanner;

/**
 * 输出倒三角
 *     *
 *    **
 *   ***
 *  ****
 * *****
 */
public class InvertedTri {
    public static void main(String[] args) {
        System.out.println("请输入三角形的边长：");
        Scanner scanner = new Scanner(System.in);
        int sc = scanner.nextInt();
        for (int i = 1; i <=sc; i++) {
            for (int j = 1; j <= sc-i; j++) {
                System.out.print(" ");
            }
            for (int j = 1; j <= i; j++) {
                System.out.print("*");
            }
            System.out.println();
        }
    }
}
